home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Introducing the New Way to Shop from Home
/
Iceland.iso
/
pc
/
noqtinternetaccess.dir
/
00333_Script_Rollover Member Change
< prev
next >
Wrap
Text File
|
2003-03-05
|
2KB
|
72 lines
-- DESCRIPTION --
on getBehaviorDescription me
return \
"ROLLOVER MEMBER CHANGE" & RETURN & RETURN & \
"Change the sprite's cast member when the mouse rolls over the sprite." & RETURN & RETURN & \
"PARAMETERS:" & RETURN & \
"* Rollover cast member"
end getBehaviorDescription
on getBehaviorTooltip me
return \
"Use with graphic members." & RETURN & RETURN & \
"Swaps a sprite's cast member on rollover."
end getBehaviorTooltip
-- HISTORY --
-- 22 October 1998, written for the D7 Behaviors Palette by James Newton
--
-- Modified 7 January, 2000 by T. Higgins to include the isOKToAttach
-- event handler along with removing some redundant error checking.
property spriteNum
property mySprite
property myStandardMember
property myRollovermember
on beginSprite me
mySprite = sprite (me.spriteNum)
myStandardMember = mySprite.member
end
on mouseEnter me
mySprite.member = myRolloverMember
end mouseEnter
on mouseLeave me
mySprite.member = myStandardMember
end mouseLeave
on isOKToAttach (me, aSpriteType, aSpriteNum)
case aSpriteType of
#graphic:
return TRUE
#script:
return FALSE
end case
end isOKToAttach
on getPropertyDescriptionList
if the currentSpriteNum = 0 then exit
theMember = sprite(the currentSpriteNum).member
theMemberNumber = theMember.number
return \
[ \
#myRolloverMember: \
[ \
#comment: "Display which member on rollover?", \
#format: #graphic, \
#default: member (theMemberNumber + 1) \
] \
]
end getPropertyDescriptionList